import service from "@/utils/request";

export const sendCodeService = params => 
    service({
        url: '/user/sendCode',
        method: 'post',
        data: params
    })


export const codeLoginService = params => 
    service({
        url: '/user/code/login',
        method: 'post',
        data: params
    })


export const logoutService = () => 
    service({
        url: '/user/logout',
        method: 'delete'
    })


export const getUserInfoService = () =>
    service({
        url: '/user/info',
        method: 'get'
    })


export const getUserDetailService = () => 
    service({
        url: '/user/detail',
        method: 'get'
    })


export const editUserService = params => 
    service({
        url: '/user/edit',
        method: 'put',
        data: params
    })

export const updateHeadImageService = params => 
    service({
        url: '/user/head-image/update',
        method: 'put',
        data: params
    })


